<ul class="grey-box">
    <div class="alert stream-privacy-status"></div>
    <h4>{{t 'Who can access the stream?'}}
        {{> help_link_widget link="/help/stream-permissions" }}
    </h4>
    {{#each stream_privacy_policy_values}}
    <li>
        <label class="radio">
            <input type="radio" name="privacy" value="{{ this.code }}" {{#if (eq this.code ../stream_privacy_policy) }}checked{{/if}} />
            <b>{{ this.name }}:</b> {{ this.description }}
        </label>
    </li>
    {{/each}}
    <h4>{{t 'Who can post to the stream?'}}
        {{> help_link_widget link="/help/stream-sending-policy" }}
    </h4>
    {{#each stream_post_policy_values}}
    <li>
        <label class="radio">
            <input type="radio" name="stream-post-policy" value="{{ this.code }}" {{#if (eq this.code ../stream_post_policy) }}checked{{/if}} />
            {{ this.description }}
        </label>
    </li>
    {{/each}}
    {{#if (or is_owner is_stream_edit)}}
    <h4>{{t "Message retention for stream" }}
        {{> help_link_widget link="/help/message-retention-policy" }}
    </h4>

    {{> settings/upgrade_tip_widget}}

    <li>
        <div class="input-group inline-block">
            <label for="stream_message_retention_setting" class="dropdown-title">{{t "Message retention period" }}
                <i class="fa fa-info-circle settings-info-icon realm_allow_message_deleting_tooltip tippy-zulip-tooltip" aria-hidden="true" data-tippy-content="{{t 'Only owners can change stream message retention policy.' }}"></i>
            </label>
            <select name="stream_message_retention_setting"
              class="stream_message_retention_setting" class="prop-element"
              {{#if disable_message_retention_setting}}disabled{{/if}}>
                <option value="realm_default">{{t 'Use organization level settings' }} {{realm_message_retention_setting}}</option>
                <option value="forever">{{t 'Retain forever' }}</option>
                <option value="retain_for_period">{{t 'Retain for N days after posting' }}</option>
            </select>

            <div class="dependent-inline-block stream-message-retention-days-input">
                <label class="inline-block">
                    {{t 'N' }}:
                </label>
                <input type="text" autocomplete="off"
                  name="stream-message-retention-days"
                  class="stream-message-retention-days"
                  value="{{ stream_message_retention_days }}"
                  {{#if disable_message_retention_setting}}disabled{{/if}}/>
            </div>
        </div>
    </li>
    {{/if}}
</ul>
